package service.impl;

import dao.OrderDao;
import dao.SkillDao;
import entity.Order;
import entity.Skill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.OrderService;
import service.SkillService;

import java.util.List;

@Service()
@Transactional
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;


    @Override
    public List<Order> getOrders(Order order, Skill skill) {
        return orderDao.getOrders(order,skill);
    }



    @Override
    public Integer addOrder(Order order) {
        return orderDao.addOrder(order);
    }

    @Override
    public Integer delOrder(Integer orderid) {
        return orderDao.delOrder(orderid);
    }

    @Override
    public Order getOrderById(Integer orderid) {
        return orderDao.getOrderById(orderid);
    }

    @Override
    public Integer updateOrder(Order order) {
        return orderDao.updateOrder(order);
    }


}
